package pta_11_8;

import java.util.Arrays;
import java.util.Scanner;

public class MaxObject {
	public static Object max(@SuppressWarnings("rawtypes") Comparable[] a) {
		Arrays.sort(a);
		return (Object) a[a.length-1];
	}
	public static void main(String[] args) {
		String[] strings = new String[5];
		Integer [] ints = new Integer[5];
		Scanner s = new Scanner(System.in);
		for(int i = 0; i < strings.length; i++) {
			strings[i] = s.nextLine();
		}
		
		for(int i = 0; i < ints.length; i++) {
			ints[i] = s.nextInt();
		}
		System.out.println("Max string is "+max(strings));
		System.out.println("Max integer is "+max(ints));
		s.close();

	}
}
